-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-49269][SQL] Eagerly evaluate VALUES() list in AstBuilder #47791
Closed
costas-db
wants to merge
10
commits into
apache:master
from
costas-db:eagerlyEvaluateUnresolvedInlineTableInAstBuilder
Closed
[SPARK-49269][SQL] Eagerly evaluate VALUES() list in AstBuilder #47791
costas-db
wants to merge
10
commits into
apache:master
from
costas-db:eagerlyEvaluateUnresolvedInlineTableInAstBuilder
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
costas-db
changed the title
[SQL] Eagerly evaluate VALUES() list in AstBuilder
[WIP][SQL] Eagerly evaluate VALUES() list in AstBuilder
Aug 16, 2024
costas-db
changed the title
[WIP][SQL] Eagerly evaluate VALUES() list in AstBuilder
[WIP][SPARK-49269][SQL] Eagerly evaluate VALUES() list in AstBuilder
Aug 16, 2024
costas-db
changed the title
[WIP][SPARK-49269][SQL] Eagerly evaluate VALUES() list in AstBuilder
[SPARK-49269][SQL] Eagerly evaluate VALUES() list in AstBuilder
Aug 16, 2024
dtenedor
approved these changes
Aug 16, 2024
cloud-fan
approved these changes
Aug 17, 2024
Ill merge after CI passes |
HyukjinKwon
reviewed
Aug 19, 2024
@@ -226,4 +287,72 @@ class InlineTableParsingImprovementsSuite extends QueryTest with SharedSparkSess | |||
} | |||
} | |||
} | |||
|
|||
test("Value list in subquery") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a JIRA prefix in the test title
Suggested change
test("Value list in subquery") { | |
test("SPARK-49269: Value list in subquery") { |
HyukjinKwon
reviewed
Aug 19, 2024
} | ||
} | ||
|
||
test("Value list in projection list subquery") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
HyukjinKwon
approved these changes
Aug 19, 2024
Merged to master. |
IvanK-db
pushed a commit
to IvanK-db/spark
that referenced
this pull request
Sep 20, 2024
### What changes were proposed in this pull request? This is a continuation of a prior performance improvement: apache#47428 that eagerly evaluates memory-heavy `UnresolvedUnlineTables` parse tree nodes as soon as they are constructed in the AstBuilder. This PR applies this optimization to any statement that might contain one or more `VALUES()` clauses (such as subqueries etc), instead of just applying that optimization to `INSERT INTO ... VALUES` statements, which is what the prior PR did. ### Why are the changes needed? With these changes we not only reduce the memory footprint of every statement that can contain the `VALUES()` clause, but we also improve upon the previous optimization as we avoid unnecessary traversals of the parse tree, which not only improves the runtime performance, but also minimizes the amount of time in which the `UnresolvedInlineTable` is kept in memory. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Provided scala tests. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#47791 from costas-db/eagerlyEvaluateUnresolvedInlineTableInAstBuilder. Authored-by: Costas Zarifis <costas.zarifis@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
attilapiros
pushed a commit
to attilapiros/spark
that referenced
this pull request
Oct 4, 2024
### What changes were proposed in this pull request? This is a continuation of a prior performance improvement: apache#47428 that eagerly evaluates memory-heavy `UnresolvedUnlineTables` parse tree nodes as soon as they are constructed in the AstBuilder. This PR applies this optimization to any statement that might contain one or more `VALUES()` clauses (such as subqueries etc), instead of just applying that optimization to `INSERT INTO ... VALUES` statements, which is what the prior PR did. ### Why are the changes needed? With these changes we not only reduce the memory footprint of every statement that can contain the `VALUES()` clause, but we also improve upon the previous optimization as we avoid unnecessary traversals of the parse tree, which not only improves the runtime performance, but also minimizes the amount of time in which the `UnresolvedInlineTable` is kept in memory. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Provided scala tests. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#47791 from costas-db/eagerlyEvaluateUnresolvedInlineTableInAstBuilder. Authored-by: Costas Zarifis <costas.zarifis@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This is a continuation of a prior performance improvement: #47428 that eagerly evaluates memory-heavy
UnresolvedUnlineTables
parse tree nodes as soon as they are constructed in the AstBuilder.This PR applies this optimization to any statement that might contain one or more
VALUES()
clauses (such as subqueries etc), instead of just applying that optimization toINSERT INTO ... VALUES
statements, which is what the prior PR did.Why are the changes needed?
With these changes we not only reduce the memory footprint of every statement that can contain the
VALUES()
clause, but we also improve upon the previous optimization as we avoid unnecessary traversals of the parse tree, which not only improves the runtime performance, but also minimizes the amount of time in which theUnresolvedInlineTable
is kept in memory.Does this PR introduce any user-facing change?
No
How was this patch tested?
Provided scala tests.
Was this patch authored or co-authored using generative AI tooling?
No